package com.udd.controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.udd.beans.SampleBean;
import com.udd.data.person.PersonDAO;
import com.udd.data.person.PersonDAOImpl;
import com.udd.data.person.PersonTO;

/**
 * Sample controller.
 */
@Controller
public class SampleController {
	@Autowired
	private PersonDAO personDAO;
	
	@RequestMapping("/sample")
	public String index(Model model) {
		//PersonDAO dao = new PersonDAOImpl();
		PersonTO personTO = personDAO.getPersonById(1);
		model.addAttribute(new SampleBean());
		return "sample";
	}
	
}
